<?php 
if(isset($this->session->userdata)) {
	$role = $this->session->userdata('role');
}
?>

<div class="clear_both"></div>
<div class="main_container">
	<fieldset>
	
		<legend>Add User</legend>
		
			<?php echo validation_errors(); ?>
			<?php echo form_open('user/addUser');?>
		<div class="add_user_form">
		
		
		<table cellpadding="5">
			<tr>
				<td>Email:</td>
				<td><input type="text" name="email" id="email"></td>
			</tr>
			<tr>
				<td>Password:</td>
				<td><input type="password" name="password" id="password"></td>
			</tr>
			<tr>
				<td>Confirm Password:</td>
				<td><input type="password" name="confirm_password" id="confirm_password"></td>
			</tr>
			<?php if(isset($role) && $role == 'superadmin'){?>
			<tr>
				<td>Client:</td>
				<td>
					<select name="client" id="client">
						<option value=""> -- Select --</option>
					</select>
				</td>
			</tr>
			<?php } ?>
			<tr>
				<td>&nbsp;</td>
				<td><input type="submit" name="submit" value="Submit"></td>
			</tr>
			
		</table>
		</div>
		</fieldset>
	<?php echo form_hidden("user_id",11);?>
	
	<?php echo form_close();?>	
</div>